/* 
 * tx_functions.h
 * Created on November 29, 2005; 2:45 PM
 * by vramadurai
 */
#ifndef _TX_FUNCTIONS_H_
#define _TX_FUNCTIONS_H_

void wait_sub_buffer_filled();
void reset_sub_buffer_interrupt();


hs_uint16_t 
scramble_tx(
                struct HS_PhyTx11bStr  *volatile HS_PhyTx11bPtrTh1,
                hs_uint8_t *ucStateTable1Bit,
                hs_uint16_t usBit
           );

hs_uint16_t 
scramble2_tx(
                struct HS_PhyTx11bStr  *volatile HS_PhyTx11bPtrTh1,
                hs_uint8_t *ucStateTable2Bit,
                hs_uint16_t *usDQPSKNew,
                hs_uint16_t usBit
           );

void 
copy_tail(
            hs_int16_t *out,
            hs_int16_t *in
         );

void 
update_and_transmit(
                        struct HS_PhyTx11bStr  *volatile HS_PhyTx11bPtrTh1,
                        hs_uint16_t usDiffSymbIndex,
                        hs_int16_t * restrict PSKTbl
                   );

void 
update_and_transmit_1mbps(
                        struct HS_PhyTx11bStr  *volatile HS_PhyTx11bPtrTh1,
                        hs_uint16_t usDiffSymbIndex,
                        hs_int16_t * restrict PSKTbl
                   );

void 
update_and_transmit_2mbps(
                        struct HS_PhyTx11bStr  *volatile HS_PhyTx11bPtrTh1,
                        hs_uint16_t usDiffSymbIndex,
                        hs_int16_t * restrict PSKTbl
                   );


hs_uint16_t 
do_dqpsk(
            struct HS_PhyTx11bStr  *volatile HS_PhyTx11bPtrTh,
            hs_uint16_t *usDQPSKNew,
            hs_uint16_t *usInputBit,
            hs_int32_t flip_flag
         );


hs_uint16_t
scramble55_tx(
                struct HS_PhyTx11bStr  *volatile HS_PhyTx11bPtrTh,
                hs_uint8_t *ucStateTable4Bit,
                hs_uint16_t usBit
             );


void 
cck55_transmit(
                struct HS_PhyTx11bStr  *volatile HS_PhyTx11bPtrTh,
                hs_uint16_t usInputBit,
                hs_uint16_t usDiffSymbIndex,
                hs_int16_t * restrict psCckDqpskSeq                
            );

void 
cck11_transmit(
                struct HS_PhyTx11bStr  *volatile HS_PhyTx11bPtrTh1,
                hs_uint16_t usInputBit,
                hs_uint16_t usDiffSymbIndex,
                hs_int16_t * restrict psCckDqpsk11,              
                hs_int16_t *index11IPtr,
                hs_int16_t *index11QPtr,
                hs_int16_t *QtoIIndexPtr
            );

hs_uint16_t
scramble11_tx(
                struct HS_PhyTx11bStr  *volatile HS_PhyTx11bPtrTh1,
                hs_uint8_t *ucStateTable4Bit,
                hs_uint16_t usBit
             );
#endif

